package com.jft.spread.pojo.vo;

import com.jft.spread.pojo.enums.UserEnums;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author Chopper
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthUser implements Serializable {

    private static final long serialVersionUID = 582441893336003319L;

    /**
     * id
     */
    private Long id;

    /**
     * 用户名
     */
    private String name;

    /**
     * 头像
     */
    private String img;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 邀请码
     */
    private String invitationCode;

    /**
     * 长期有效（用于手机app登录场景或者信任场景等）
     */
    private Boolean longTerm = false;

    /**
     * @see UserEnums
     * 角色
     */
    private UserEnums role;


    public AuthUser(Long id, String phone, String name, String img, String invitationCode, UserEnums role) {
        this.id = id;
        this.phone = phone;
        this.name = name;
        this.img = img;
        this.invitationCode = invitationCode;
        this.role = role;
    }


}
